<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>登录</title>
	<link type="text/css" rel="stylesheet" th:href="@{/css/bootstrap-3.3.7-dist/css/style2.css}" />
	<link type="text/css" rel="stylesheet" th:href="@{/css/bootstrap-3.3.7-dist/css/public.css}" />
	<script th:src="@{/js/jquery-1.9.1.min.js}"></script>
	<link href="https://cdn.jsdelivr.net/npm/@bootcss/v3.bootcss.com@1.0.8/dist/css/bootstrap.min.css" rel="stylesheet">
	<style type="text/css">
		th{
			text-align:center;/** 设置水平方向居中 */
			vertical-align:middle/** 设置垂直方向居中 */
		}
	</style>
</head>

<body style="background: #f0f0f0">

<div class="right">
	<div class="location">
		<strong>你现在所在的位置是:</strong>
		<span>供应商列表页面</span>
	</div>
	<div class="search">
		<form method="get" action="/user/selectproviderbykey">
<!--			<input name="method" value="query" type="hidden">-->
			<span>供应商编码：</span>
			<input name="queryProCode" id="queryProCode" type="text" value="">
			<span>供应商名称：</span>
			<input name="queryProName" id="queryProName" type="text" value="">
			<input value="查 询" type="submit" id="searchbutton"style="height:35px ;width:70px;margin-top: 5px">
			<span><a class="addProvider"  th:href="@{/user/provideradd}">添加</a></span>
		</form>


<!--		<img th:src="@{/css/bootstrap-3.3.7-dist/images/tianjia.png}" alt="添加" title="添加"/>-->
	</div>
	<!--供应商操作表格-->
	<table class="providerTable" cellpadding="0" cellspacing="0">
		<tr class="firstTr">
			<th width="10%">供应商编码</th>
			<th width="20%">供应商名称</th>
			<th width="10%">联系人</th>
			<th width="10%">联系电话</th>
			<th width="10%">传真</th>
			<th width="10%">创建时间</th>
			<th width="30%">操作</th>
		</tr>

		<tbody id="tbody">
		<tr th:each="provider : ${pageInfo.list}">
			<td th:text="${provider.proCode}"></td>
			<td th:text="${provider.proName}"></td>
			<td th:text="${provider.proContact}"></td>
			<td th:text="${provider.proPhone}"></td>
			<td th:text="${provider.proFax}"></td>
			<td th:text="${provider.creationDate}" pattern="yyyy-MM-dd"></td>
			<td>
				<span><a class="viewProvider" th:href="@{/user/viewProvider/}+${provider.id}"><img th:src="@{/css/bootstrap-3.3.7-dist/images/read.png}" alt="查看" title="查看"/></a></span>
				<span><a class="modifyProvider" th:href="@{/user/modifyProvider/}+${provider.id}"><img th:src="@{/css/bootstrap-3.3.7-dist/images/xiugai.png}" alt="修改" title="修改"/></a></span>
				<span><a class="deleteProvider" onClick="return confirm('确定删除?');" th:href="@{/user/deleteProvider/}+${provider.id}"><img th:src="@{/css/bootstrap-3.3.7-dist/images/schu.png}" alt="删除"  title="删除"/></a></span>
			</td>
		</tr>
		</tbody>
		<script>
			//var r=confirm("确实要删除吗?")
			function del(){
				if(confirm("确实要删除吗?")){
					alert("已经删除！");
					return true;
				}else{
					alert("已经取消了删除操作");
					return  false;
				}
			}
		</script>
	</table>


	<div class="row">
		<!--分页文字信息  -->
		<div class="col-md-6" id="page_info_area" style="font-size: 18px">
			当前<span th:text="${pageInfo.pageNum}"></span>页，
			总<span th:text="${pageInfo.pages}"></span>页，
			总<span th:text="${pageInfo.total}"></span>条记录
		</div>
		<!-- 分页条信息 -->
		<div class="col-md-6" id="page_nav_area"style="margin-top: -17px">
			<ul class="pagination">
				<li><a th:href="@{/user/providerlist/}+1">首页</a></li>
				<li><a th:href="@{/user/providerlist/}+${pageInfo.prePage}">&laquo;</a></li>
				<!--<span th:if=" ${pageInfo.navigatepageNums } le 6 ">-->

				<li th:each="p : ${pageInfo.navigatepageNums}">
					<a th:href="@{/user/providerlist/}+${p}" th:text="${p}"> </a>
				</li>
				<!--</span>-->
				<!--<li th:each="p : ${pageInfo.navigatepageNums}">-->
				<!--<a th:text="${p}"> </a>-->
				<!--</li>-->
				<li><a th:href="@{/user/providerlist/}+${pageInfo.nextPage}">&raquo</a></li>
				<li><a th:href="@{/user/providerlist/}+${pageInfo.pages}" id="lastPage" th:attr="lastPage=${pageInfo.pages},
                            totalSize=${pageInfo.total}">末页</a></li>
			</ul>
		</div>

</div>
</div>
</body>
</html>